{extend name="main/index" /}
{block name="main"}
<script type="text/javascript">
    $(document).ready(function(){

        //全选
        $("#allchoose").bind("click",function(){
            $("#checked input[type=checkbox]").checkBox("all");
        });

        // 取消
        $("#delete").bind("click",function(){
            $("#checked input[type=checkbox]").checkBox("none");
        });

        //反选
        $("#reverse").bind("click",function(){
            $("#checked input[type=checkbox]").checkBox("toggle");
        });

        //输出
        $("#exit").bind("click",function(){
            alert($("#checked input[type=checkbox][checked]").checkedValue());
        });

    });
</script>
<div class="content-page">
    <div class="content">
        <div class="page-heading">
            <h1><i class='fa fa-table'></i> 用户管理</h1>
            <h3></h3>
        </div>
        <div class="row">
            <form name="regform" action="{:url('admin/con2/giveRole')}" method="post">
                <div class="col-md-12">
                    <div class="widget">
                        <div class="widget-header transparent">
                            <h2><strong>给{$row['name']}分配角色</strong></h2>
                            <div class="additional-btn">
                                <a href="#" class="hidden reload"><i class="icon-ccw-1"></i></a>
                                <a href="#" class="widget-toggle"><i class="icon-down-open-2"></i></a>
                                <a href="#" class="widget-close"><i class="icon-cancel-3"></i></a>
                            </div>
                        </div>
                        <div class="widget-content">
                            <div id="checked">
                                <input type="hidden" name="user_id" value="{$row['id']}">
                                {volist name="role" id="v" mod="2"}
                                <div class="mar20">
                                    <input id="checkbox1" type="checkbox" name="role_id{$v['id']}" value="{$v['id']}" class="rows-check" {$v['check']}><label for="checkbox1">{$v['name']}</label>
                                </div>
                                {/volist}

                            </div>
                            <div class="mar20">



                                <input type="submit"  id="exit" value="提交" />
                            </div>
                        </div>
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>

{/block}